// mock 的核心文件
// 1. cnpm i -S mockjs
// 2. 伪造接口
// 3. mock/index.js  在main.js 注入一下
import Mock from 'mockjs'
import homedata from './homedata'
import logindata from './logindata'
//  接口名  /home
// 参数1 接口的正则表达式，注意正则没有引号
// 参数2  请求类型  get post put delete
// 参数3 就是返回给前端的数据
Mock.mock(/\/home/, 'get', homedata.gethomedata)
Mock.mock(/\/deleteHomeByid/, 'post', homedata.deleteHomeByid)
Mock.mock(/\/deleteMoreByids/, 'post', homedata.deleteMoreByids)
Mock.mock(/\/addData/, 'post', homedata.addData)
Mock.mock(/\/updateData/, 'post', homedata.updateData)
Mock.mock(/\/loginApi/, 'post', logindata.loginApi)